package com.neu.service;

import com.github.pagehelper.PageHelper;
import com.neu.dao.ShoppingFootprintMapper;
import com.neu.domain.ShoppingFootprint;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class ShoppingFootprintService {
    @Autowired
    private ShoppingFootprintMapper shoppingFootprintMapper;
    public List<ShoppingFootprint> querySelective(String pageSize,String pageNum,Integer userId,Integer goodsId,String sort,String order){
        int size = Integer.parseInt(pageSize);
        int num = Integer.parseInt(pageNum);
        PageHelper.startPage(num,size);
        List<ShoppingFootprint> footprintList = shoppingFootprintMapper.selectByExample1(userId,goodsId);
        if (footprintList.size() != 0){
            return footprintList;
        }
        return null;
    }
}
